<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');


		
   	function uniqueid(){
		$result =  mysql_query("SELECT MAX(id) as lastinsert FROM  m_members");
		$row    = mysql_fetch_object($result);
		$newid= $row->lastinsert+1;
		return 'MAR10'.$newid;
		}
	
	function get_education($id){
		$CI =& get_instance();
		$query = $CI->db->query("SELECT * from m_education WHERE id = ".$id."");
		$row   =$query->row();
		if ($query->num_rows() > 0)
			return $row->name;
	
	}	
	function get_select_box($table,$id=''){
		$option = '';
		$query = mysql_query("SELECT * FROM ".$table."");
		while($row = mysql_fetch_array($query)){
					 if($row['id'] == $id)
					 	 $option .='  <option value="'.$row['id'].'" selected="selected">'.$row['name'].'</option>';
					 else	 
					  $option .='  <option value="'.$row['id'].'">'.$row['name'].'</option>';
			
			}
			
	return $option;
	}
	function get_select_occupation($id=''){
		$option = '';
		$query = mysql_query("SELECT * FROM m_occupation_category WHERE status = 1");
		while($row = mysql_fetch_array($query)){
			$option .='<optgroup label="'.$row['name'].'">';
				$query_inner = mysql_query("SELECT * FROM m_occupation WHERE category = ".$row['id']."");
				while($row_inner = mysql_fetch_array($query_inner)){
					 if($row_inner['id'] == $id)
					 	 $option .='  <option value="'.$row_inner['id'].'" selected="selected">'.$row_inner['name'].'</option>';
					 else	 
					  $option .='  <option value="'.$row_inner['id'].'">'.$row_inner['name'].'</option>';
				}
			$option .='</optgroup>';
			}
	
	return $option;
	}
	function get_select_education($id=''){
		//$query = mysql_query("SELECT * FROM ".$table." WHERE id ='".$id."'");
		//$row   = mysql_fetch_array($query);
		//return $row['name'];
		$option = '';
		$query = mysql_query("SELECT * FROM m_education_category WHERE status = 1");
		while($row = mysql_fetch_array($query)){
			$option .='<optgroup label="'.$row['name'].'">';
				$query_inner = mysql_query("SELECT * FROM m_education WHERE category = ".$row['id']."");
				while($row_inner = mysql_fetch_array($query_inner)){
					 if($row_inner['id'] == $id)
					 	 $option .='  <option value="'.$row_inner['id'].'" selected="selected">'.$row_inner['name'].'</option>';
					 else	 
					  $option .='  <option value="'.$row_inner['id'].'">'.$row_inner['name'].'</option>';
				}
			$option .='</optgroup>';
			}
	
	return $option;

	$education ='<optgroup label="Bachelors - Engineering / Computers / Others">
                  <option value="5">BCA</option>
                  <option value="6">Aeronautical Engineering</option>
                  <option value="8">B Arch</option>
                  <option value="9">B Plan</option>
                  <option value="49">BE</option>
                  <option selected="selected" value="50">B Tech</option>
                  <option value="83">Other Bachelor Degree</option>
                  <option value="95">BSc IT / Computer Science</option>
                  </optgroup>
                  <optgroup label="Masters - Engineering / Computers / Others">
                  <option value="3">MS (Engg.)</option>
                  <option value="7">M Arch</option>
                  <option value="51">MCA</option>
                  <option value="52">PGDCA</option>
                  <option value="53">ME</option>
                  <option value="54">M Tech</option>
                  <option value="55">MSc IT / Computer Science</option>
                  <option value="84">Other Master Degree</option>
                  </optgroup>
                  <optgroup label="Bachelors - Arts / Science / Commerce / Others">
                  <option value="15">B Phil</option>
                  <option value="16">BCom</option>
                  <option value="17">BSc</option>
                  <option value="18">BA</option>
                  <option value="39">B Ed</option>
                  <option value="43">Aviation Degree</option>
                  <option value="56">BFA</option>
                  <option value="57">BLIS</option>
                  <option value="58">BSW</option>
                  <option value="59">BMM (MASS MEDIA)</option>
                  <option value="66">BFT</option>
                  <option value="85">Other Bachelor Degree</option>
                  </optgroup>
                  <optgroup label="Masters - Arts / Science / Commerce / Others">
                  <option value="10">M Phil</option>
                  <option value="11">M Com</option>
                  <option value="12">M Sc</option>
                  <option value="13">MA</option>
                  <option value="38">M Ed</option>
                  <option value="60">MLIS</option>
                  <option value="63">MSW</option>
                  <option value="86">Other Master Degree</option>
                  </optgroup>
                  <optgroup label="Bachelors - Management / Others">
                  <option value="19">BHM</option>
                  <option value="35">BBA</option>
                  <option value="65">BFM (Financial Management)</option>
                  <option value="87">Other Bachelor Degree in Management</option>
                  </optgroup>
                  <optgroup label="Masters - Management / Others">
                  <option value="14">MHM</option>
                  <option value="61">MBA</option>
                  <option value="62">PGDM</option>
                  <option value="64">MHRM (Human Resource Management)</option>
                  <option value="76">MFM (Financial Management)</option>
                  <option value="96">Other Master Degree  in Management</option>
                  </optgroup>
                  <optgroup label="Bachelors - Medicine - General / Dental / Surgeon / Others">
                  <option value="21">MBBS</option>
                  <option value="25">BDS</option>
                  <option value="27">BPT</option>
                  <option value="28">BHMS</option>
                  <option value="29">BAMS</option>
                  <option value="31">B Pharm</option>
                  <option value="68">BSMS</option>
                  <option value="69">BUMS</option>
                  <option value="88">Other Bachelor Degree in Medicine</option>
                  </optgroup>
                  <optgroup label="Masters - Medicine - General / Dental / Surgeon / Others">
                  <option value="20">MD / MS (Medical)</option>
                  <option value="22">MDS</option>
                  <option value="23">MVSc </option>
                  <option value="24">MPT</option>
                  <option value="97">Other Master Degree in Medicine</option>
                  </optgroup>
                  <optgroup label="Bachelors - Legal / Others">
                  <option value="72">BGL</option>
                  <option value="73">BL</option>
                  <option value="74">LLB</option>
                  <option value="90">Other Bachelor Degree in Legal</option>
                  </optgroup>
                  <optgroup label="Masters - Legal / Others">
                  <option value="70">ML</option>
                  <option value="71">LLM</option>
                  <option value="89">Other Master Degree in  Legal</option>
                  </optgroup>
                  <optgroup label="Finance - ICWAI / CA / CS/ CFA / Others">
                  <option value="36">CA</option>
                  <option value="37">ICWA</option>
                  <option value="48">CS</option>
                  <option value="75">CFA (Chartered Financial Analyst)</option>
                  <option value="91">Other Degree in Finance</option>
                  </optgroup>
                  <optgroup label="Service - IAS / IPS / IRS / IES / IFS / Others">
                  <option value="77">IAS</option>
                  <option value="78">IPS</option>
                  <option value="79">IRS</option>
                  <option value="80">IES</option>
                  <option value="81">IFS</option>
                  <option value="92">Other Degree in Service</option>
                  </optgroup>
                  <optgroup label="PhD">
                  <option value="33">Ph D</option>
                  </optgroup>
                  <optgroup label="Diploma / Others">
                  <option value="45">Trade School</option>
                  <option value="46">Diploma</option>
                  <option value="82">Polytechnic</option>
                  </optgroup>
                  <optgroup label="Higher Secondary / Secondary">
                  <option value="47">High School</option>
                  </optgroup>';
	return $education;			  
                
	}
	function get_select_day($day){
		
		 return '<option value="" >-Date-</option>
        		<option value="1" '.($day== 1 ? 'selected' : '').'>1</option>
                <option value="2" '.($day== 2 ? 'selected' : '').'>2</option>
                <option value="3" '.($day== 3 ? 'selected' : '').'>3</option>
                <option value="4" '.($day== 4 ? 'selected' : '').'>4</option>
                <option value="5" '.($day== 5 ? 'selected' : '').'>5</option>
                <option value="6" '.($day== 6 ? 'selected' : '').'>6</option>
                <option value="7" '.($day== 8 ? 'selected' : '').'>7</option>
                <option value="8" '.($day== 8 ? 'selected' : '').'>8</option>
                <option value="9" '.($day== 9 ? 'selected' : '').'>9</option>
                <option value="10" '.($day== 10 ? 'selected' : '').'>10</option>
                <option value="11" '.($day== 11 ? 'selected' : '').'>11</option>
                <option value="12" '.($day== 12 ? 'selected' : '').'>12</option>
                <option value="13" '.($day== 13 ? 'selected' : '').'>13</option>
                <option value="14" '.($day== 14 ? 'selected' : '').'>14</option>
                <option value="15" '.($day== 15 ? 'selected' : '').'>15</option>
                <option value="16" '.($day== 16 ? 'selected' : '').'>16</option>
                <option value="17" '.($day== 17 ? 'selected' : '').'>17</option>
                <option value="18" '.($day== 18 ? 'selected' : '').'>18</option>
                <option value="19" '.($day== 19 ? 'selected' : '').'>19</option>
                <option value="20" '.($day== 20 ? 'selected' : '').'>20</option>
                <option value="21" '.($day== 21 ? 'selected' : '').'>21</option>
                <option value="22" '.($day== 22 ? 'selected' : '').'>22</option>
                <option value="23" '.($day== 23 ? 'selected' : '').'>23</option>
                <option value="24" '.($day== 24 ? 'selected' : '').'>24</option>
                <option value="25" '.($day== 25 ? 'selected' : '').'>25</option>
                <option value="26" '.($day== 26 ? 'selected' : '').'>26</option>
                <option value="27" '.($day== 27 ? 'selected' : '').'>27</option>
                <option value="28" '.($day== 28  ? 'selected' : '').'>28</option>
                <option value="29" '.($day== 29  ? 'selected' : '').'>29</option>
                <option value="30" '.($day== 30  ? 'selected' : '').'>30</option>
                <option value="31" '.($day== 31  ? 'selected' : '').'>31</option>';
				
				}
	function get_select_month($month){
		
		 return ' <option value="">-Month-</option>
                <option value="1" '.($month== 1 ? 'selected' : '').'>January</option>
                <option value="2" '.($month== 2 ? 'selected' : '').'>February</option>
                <option value="3" '.($month== 3 ? 'selected' : '').'>March</option>
                <option value="4" '.($month== 4 ? 'selected' : '').'>April</option>
                <option value="5" '.($month== 5 ? 'selected' : '').'">May</option>
                <option value="6" '.($month== 6 ? 'selected' : '').'>June</option>
                <option value="7" '.($month== 7 ? 'selected' : '').'>July</option>
                <option value="8" '.($month== 8 ? 'selected' : '').'>August</option>
                <option value="9" '.($month== 9 ? 'selected' : '').'>September</option>
                <option value="10" '.($month==10 ? 'selected' : '').'>October</option>
                <option value="11" '.($month== 11 ? 'selected' : '').'>November</option>
                <option value="12" '.($month== 12 ? 'selected' : '').'>December</option>';
				
				}
	function get_select_year($year){ 
	return ' <option value="" selected="">-Year-</option>
                <option value="1995" '.($year== 1995 ? 'selected' : '').'>1995</option>
                <option value="1994" '.($year== 1994 ? 'selected' : '').'>1994</option>
                <option value="1993" '.($year== 1993 ? 'selected' : '').'>1993</option>
                <option value="1992" '.($year== 1992 ? 'selected' : '').'>1992</option>
                <option value="1991" '.($year== 1981 ? 'selected' : '').'>1991</option>
                <option value="1990" '.($year== 1990 ? 'selected' : '').'>1990</option>
                <option value="1989" '.($year== 1989 ? 'selected' : '').'>1989</option>
                <option value="1988" '.($year== 1988 ? 'selected' : '').'>1988</option>
				<option value="1987" '.($year== 1987 ? 'selected' : '').'>1987</option>
                <option value="1986" '.($year== 1986 ? 'selected' : '').'>1986</option>
                <option value="1985" '.($year== 1985 ? 'selected' : '').'>1985</option>
                <option value="1984" '.($year== 1984 ? 'selected' : '').'>1984</option>
                <option value="1983" '.($year== 1983 ? 'selected' : '').'>1983</option>
                <option value="1982" '.($year== 1982 ? 'selected' : '').'>1982</option>
                <option value="1981" '.($year== 1981 ? 'selected' : '').'>1981</option>
                <option value="1980" '.($year== 1980 ? 'selected' : '').'>1980</option>
                <option value="1979" '.($year== 1979 ? 'selected' : '').'>1979</option>
                <option value="1978" '.($year== 1978 ? 'selected' : '').'>1978</option>
                <option value="1977" '.($year== 1977 ? 'selected' : '').'>1977</option>
                <option value="1976" '.($year== 1976 ? 'selected' : '').'>1976</option>
                <option value="1975" '.($year== 1975 ? 'selected' : '').'>1975</option>
                <option value="1974" '.($year== 1974 ? 'selected' : '').'>1974</option>
                <option value="1973" '.($year== 1973 ? 'selected' : '').'>1973</option>
                <option value="1972" '.($year== 1972 ? 'selected' : '').'>1972</option>
                <option value="1971" '.($year== 1971 ? 'selected' : '').'>1971</option>
                <option value="1970" '.($year== 1970 ? 'selected' : '').'>1970</option>
                <option value="1969" '.($year== 1969 ? 'selected' : '').'>1969</option>
                <option value="1968" '.($year== 1968 ? 'selected' : '').'>1968</option>
                <option value="1967" '.($year== 1967 ? 'selected' : '').'>1967</option>
                <option value="1966" '.($year== 1966 ? 'selected' : '').'>1966</option>
                <option value="1965" '.($year== 1965 ? 'selected' : '').'>1965</option>
                <option value="1964" '.($year== 1964 ? 'selected' : '').'>1964</option>
                <option value="1963" '.($year== 1963 ? 'selected' : '').'>1963</option>
                <option value="1962" '.($year== 1962 ? 'selected' : '').'>1962</option>
                <option value="1961" '.($year== 1961 ? 'selected' : '').'>1961</option>
                <option value="1960" '.($year== 1960 ? 'selected' : '').'>>1960</option>
                <option value="1959" '.($year== 1959 ? 'selected' : '').'>1959</option>
                <option value="1958" '.($year== 1958 ? 'selected' : '').'>1958</option>
                <option value="1957" '.($year== 1957 ? 'selected' : '').'>1957</option>
                <option value="1956" '.($year== 1956 ? 'selected' : '').'>1956</option>
                <option value="1955" '.($year== 1955 ? 'selected' : '').'>1955</option>
                <option value="1954" '.($year== 1954 ? 'selected' : '').'>1954</option>
                <option value="1953" '.($year== 1953 ? 'selected' : '').'>1953</option>
                <option value="1952" '.($year== 1952 ? 'selected' : '').'>1952</option>
                <option value="1951" '.($year== 1951 ? 'selected' : '').'>1951</option>
                <option value="1950" '.($year== 1950 ? 'selected' : '').'>1950</option>
                <option value="1949" '.($year== 1949 ? 'selected' : '').'>1949</option>
                <option value="1948" '.($year== 1948 ? 'selected' : '').'>1948</option>
                <option value="1947" '.($year== 1947 ? 'selected' : '').'>1947</option>
                <option value="1946" '.($year== 1946 ? 'selected' : '').'>1946</option>
                <option value="1945" '.($year== 1945 ? 'selected' : '').'>1945</option>
                <option value="1944" '.($year== 1944 ? 'selected' : '').'>1944</option>
                <option value="1943" '.($year== 1943 ? 'selected' : '').'>1943</option>';}	
	function get_select_height($height){
		return' <option value="0" '.($height== 0 ? 'selected' : '').' title="--- Feet/Inches ---" alt="--- Feet/Inches ---">--- Feet/Inches ---</option>
			    <option value="121.92" '.($height== 121.92 ? 'selected' : '').' title="4 feet" alt="4 feet">4 feet</option>
                <option value="124.46" '.($height== 121.92 ? 'selected' : '').' title="4 feet 1 inches" alt="4 feet 1 inches">4 feet 1 inches</option>
                <option value="127.00" '.($height== 127.00 ? 'selected' : '').' title="4 feet 2 inches" alt="4 feet 2 inches">4 feet 2 inches</option>
                <option value="129.54" '.($height== 129.54 ? 'selected' : '').' title="4 feet 3 inches" alt="4 feet 3 inches">4 feet 3 inches</option>
                <option value="132.08" '.($height== 132.08 ? 'selected' : '').' title="4 feet 4 inches" alt="4 feet 4 inches">4 feet 4 inches</option>
                <option value="134.62" '.($height== 134.08 ? 'selected' : '').' title="4 feet 5 inches" alt="4 feet 5 inches">4 feet 5 inches</option>
                <option value="137.16" '.($height== 137.16 ? 'selected' : '').' title="4 feet 6 inches" alt="4 feet 6 inches">4 feet 6 inches</option>
                <option value="139.70" '.($height== 139.70 ? 'selected' : '').' title="4 feet 7 inches" alt="4 feet 7 inches">4 feet 7 inches</option>
                <option value="142.24" '.($height== 142.24 ? 'selected' : '').' title="4 feet 8 inches" alt="4 feet 8 inches">4 feet 8 inches</option>
                <option value="144.78" '.($height== 144.78 ? 'selected' : '').' title="4 feet 9 inches" alt="4 feet 9 inches">4 feet 9 inches</option>
                <option value="147.32" '.($height== 147.32 ? 'selected' : '').' title="4 feet 10 inches" alt="4 feet 10 inches">4 feet 10 inches</option>
                <option value="149.86" '.($height== 149.86 ? 'selected' : '').' title="4 feet 11 inches" alt="4 feet 11 inches">4 feet 11 inches</option>
                <option value="152.40" '.($height== 152.40 ? 'selected' : '').' title="5 feet" alt="5 feet">5 feet</option>
                <option value="154.94" '.($height== 154.94 ? 'selected' : '').' title="5 feet 1 inches" alt="5 feet 1 inches">5 feet 1 inches</option>
                <option value="157.48" '.($height== 157.48 ? 'selected' : '').' title="5 feet 2 inches" alt="5 feet 2 inches">5 feet 2 inches</option>
                <option value="160.02" '.($height== 160.02 ? 'selected' : '').' title="5 feet 3 inches" alt="5 feet 3 inches">5 feet 3 inches</option>
                <option value="162.56" '.($height== 162.56 ? 'selected' : '').' title="5 feet 4 inches" alt="5 feet 4 inches">5 feet 4 inches</option>
                <option value="165.10" '.($height== 165.10 ? 'selected' : '').' title="5 feet 5 inches" alt="5 feet 5 inches">5 feet 5 inches</option>
                <option value="167.64" '.($height== 167.64 ? 'selected' : '').' title="5 feet 6 inches" alt="5 feet 6 inches">5 feet 6 inches</option>
                <option value="170.18" '.($height== 170.18 ? 'selected' : '').' title="5 feet 7 inches" alt="5 feet 7 inches">5 feet 7 inches</option>
                <option value="172.72" '.($height== 172.72 ? 'selected' : '').' title="5 feet 8 inches" alt="5 feet 8 inches">5 feet 8 inches</option>
                <option value="175.26" '.($height== 175.26 ? 'selected' : '').' title="5 feet 9 inches" alt="5 feet 9 inches">5 feet 9 inches</option>
                <option value="177.80" '.($height== 177.80 ? 'selected' : '').' title="5 feet 10 inches" alt="5 feet 10 inches">5 feet 10 inches</option>
                <option value="180.34" '.($height== 180.34 ? 'selected' : '').' title="5 feet 11 inches" alt="5 feet 11 inches">5 feet 11 inches</option>
                <option value="182.88" '.($height== 182.88 ? 'selected' : '').' title="6 feet" alt="6 feet">6 feet</option>
                <option value="185.42" '.($height== 185.42 ? 'selected' : '').' title="6 feet 1 inches" alt="6 feet 1 inches">6 feet 1 inches</option>
                <option value="187.96" '.($height== 187.96 ? 'selected' : '').' title="6 feet 2 inches" alt="6 feet 2 inches">6 feet 2 inches</option>
                <option value="190.50" '.($height== 190.50 ? 'selected' : '').' title="6 feet 3 inches" alt="6 feet 3 inches">6 feet 3 inches</option>
                <option value="193.04" '.($height== 193.04 ? 'selected' : '').' title="6 feet 4 inches" alt="6 feet 4 inches">6 feet 4 inches</option>
                <option value="195.58" '.($height== 195.58 ? 'selected' : '').' title="6 feet 5 inches" alt="6 feet 5 inches">6 feet 5 inches</option>
                <option value="198.12" '.($height== 198.12 ? 'selected' : '').' title="6 feet 6 inches" alt="6 feet 6 inches">6 feet 6 inches</option>
                <option value="200.66" '.($height== 200.66 ? 'selected' : '').' title="6 feet 7 inches" alt="6 feet 7 inches">6 feet 7 inches</option>
                <option value="203.20" '.($height== 203.20 ? 'selected' : '').' title="6 feet 8 inches" alt="6 feet 8 inches">6 feet 8 inches</option>
                <option value="205.74" '.($height== 205.74 ? 'selected' : '').' title="6 feet 9 inches" alt="6 feet 9 inches">6 feet 9 inches</option>
                <option value="208.28" '.($height== 208.28 ? 'selected' : '').' title="6 feet 10 inches" alt="6 feet 10 inches">6 feet 10 inches</option>
                <option value="210.82" '.($height== 210.82 ? 'selected' : '').' title="6 feet 11 inches" alt="6 feet 11 inches">6 feet 11 inches</option>
                <option value="213.36" '.($height== 213.36 ? 'selected' : '').' title="7 feet" alt="7 feet">7 feet</option>
                <option value="215.90" '.($height== 215.90 ? 'selected' : '').' title="7 feet 1 inches" alt="7 feet 1 inches">7 feet 1 inches</option>
                <option value="218.44" '.($height== 218.44 ? 'selected' : '').' title="7 feet 2 inches" alt="7 feet 2 inches">7 feet 2 inches</option>
                <option value="220.98" '.($height== 220.98 ? 'selected' : '').' title="7 feet 3 inches" alt="7 feet 3 inches">7 feet 3 inches</option>
                <option value="223.52" '.($height== 223.06 ? 'selected' : '').' title="7 feet 4 inches" alt="7 feet 4 inches">7 feet 4 inches</option>
                <option value="226.06" '.($height== 226.06 ? 'selected' : '').' title="7 feet 5 inches" alt="7 feet 5 inches">7 feet 5 inches</option>
                <option value="228.60" '.($height== 228.60 ? 'selected' : '').' title="7 feet 6 inches" alt="7 feet 6 inches">7 feet 6 inches</option>
                <option value="231.14" '.($height== 231.14 ? 'selected' : '').' title="7 feet 7 inches" alt="7 feet 7 inches">7 feet 7 inches</option>
                <option value="233.68" '.($height== 233.68 ? 'selected' : '').' title="7 feet 8 inches" alt="7 feet 8 inches">7 feet 8 inches</option>
                <option value="236.22" '.($height== 236.22 ? 'selected' : '').' title="7 feet 9 inches" alt="7 feet 9 inches">7 feet 9 inches</option>
                <option value="238.76" '.($height== 238.76 ? 'selected' : '').' title="7 feet 10 inches" alt="7 feet 10 inches">7 feet 10 inches</option>
                <option value="241.30" '.($height== 241.30 ? 'selected' : '').' title="7 feet 11 inches" alt="7 feet 11 inches">7 feet 11 inches</option>';
		}	
	function get_select_wight($weight){
		return '<option value="0">--Kgs--</option>
                <option value="41">41 kg</option>
				<option value="41" '.($weight== 41 ? 'selected' : '').'>41</option>
                <option value="42" '.($weight== 42 ? 'selected' : '').'>42 kg</option>
                <option value="43" '.($weight== 43 ? 'selected' : '').'>43 kg</option>
                <option value="44" '.($weight== 44 ? 'selected' : '').'>44 kg</option>
                <option value="45" '.($weight== 45 ? 'selected' : '').'>45 kg</option>
                <option value="46" '.($weight== 46 ? 'selected' : '').'>46 kg</option>
                <option value="47" '.($weight== 47 ? 'selected' : '').'>47 kg</option>
                <option value="48" '.($weight== 48 ? 'selected' : '').'>48 kg</option>
                <option value="49" '.($weight== 49 ? 'selected' : '').'>49 kg</option>
                <option value="50" '.($weight== 50 ? 'selected' : '').'>50 kg</option>
                <option value="51" '.($weight== 51 ? 'selected' : '').'>51 kg</option>
                <option value="52" '.($weight== 52 ? 'selected' : '').'>52 kg</option>
                <option value="53" '.($weight== 53 ? 'selected' : '').'>53 kg</option>
                <option value="54" '.($weight== 54 ? 'selected' : '').'>54 kg</option>
                <option value="55" '.($weight== 55 ? 'selected' : '').'>55 kg</option>
                <option value="56" '.($weight== 56 ? 'selected' : '').'>56 kg</option>
                <option value="57" '.($weight== 57 ? 'selected' : '').'>57 kg</option>
                <option value="58" '.($weight== 58 ? 'selected' : '').'>58 kg</option>
                <option value="59" '.($weight== 59 ? 'selected' : '').'>59 kg</option>
                <option value="60" '.($weight== 60 ? 'selected' : '').'>60 kg</option>
                <option value="61" '.($weight== 61 ? 'selected' : '').'>61 kg</option>
                <option value="62" '.($weight== 62 ? 'selected' : '').'>62 kg</option>
                <option value="63" '.($weight== 63 ? 'selected' : '').'>63 kg</option>
                <option value="64" '.($weight== 64 ? 'selected' : '').'>64 kg</option>
                <option value="65" '.($weight== 65 ? 'selected' : '').'>65 kg</option>
                <option value="66" '.($weight== 66 ? 'selected' : '').'>66 kg</option>
                <option value="67" '.($weight== 67 ? 'selected' : '').'>67 kg</option>
                <option value="68" '.($weight== 68 ? 'selected' : '').'>68 kg</option>
                <option value="69" '.($weight== 69 ? 'selected' : '').'>69 kg</option>
                <option value="70" '.($weight== 70 ? 'selected' : '').'>70 kg</option>
                <option value="71" '.($weight== 71 ? 'selected' : '').'>71 kg</option>
                <option value="72" '.($weight== 72 ? 'selected' : '').'>72 kg</option>
                <option value="73" '.($weight== 73 ? 'selected' : '').'>73 kg</option>
                <option value="74" '.($weight== 74 ? 'selected' : '').'>74 kg</option>
                <option value="75" '.($weight== 75 ? 'selected' : '').'>75 kg</option>
                <option value="76" '.($weight== 76 ? 'selected' : '').'>76 kg</option>
                <option value="77" '.($weight== 77 ? 'selected' : '').'>77 kg</option>
                <option value="78" '.($weight== 78 ? 'selected' : '').'>78 kg</option>
                <option value="79" '.($weight== 79 ? 'selected' : '').'>79 kg</option>
                <option value="80" '.($weight== 80 ? 'selected' : '').'>80 kg</option>
                <option value="81" '.($weight== 81 ? 'selected' : '').'>81 kg</option>
                <option value="82" '.($weight== 82 ? 'selected' : '').'>82 kg</option>
                <option value="83" '.($weight== 83 ? 'selected' : '').'>83 kg</option>
                <option value="84" '.($weight== 84 ? 'selected' : '').'>84 kg</option>
                <option value="85" '.($weight== 85 ? 'selected' : '').'>85 kg</option>
                <option value="86" '.($weight== 86 ? 'selected' : '').'>86 kg</option>
                <option value="87" '.($weight== 87 ? 'selected' : '').'>87 kg</option>
                <option value="88" '.($weight== 88 ? 'selected' : '').'>88 kg</option>
                <option value="89" '.($weight== 89 ? 'selected' : '').'>89 kg</option>
                <option value="90" '.($weight== 90 ? 'selected' : '').'>90 kg</option>
                <option value="91" '.($weight== 91 ? 'selected' : '').'>91 kg</option>
                <option value="92" '.($weight== 92 ? 'selected' : '').'>92 kg</option>
                <option value="93" '.($weight== 93 ? 'selected' : '').'>93 kg</option>
                <option value="94" '.($weight== 94 ? 'selected' : '').'>94 kg</option>
                <option value="95" '.($weight== 95 ? 'selected' : '').'>95 kg</option>
                <option value="96" '.($weight== 96 ? 'selected' : '').'>96 kg</option>
                <option value="97" '.($weight== 97 ? 'selected' : '').'>97 kg</option>
                <option value="98" '.($weight== 98 ? 'selected' : '').'>98 kg</option>
                <option value="99" '.($weight== 99 ? 'selected' : '').'>99 kg</option>
                <option value="100" '.($weight== 100 ? 'selected' : '').'>100 kg</option>
                <option value="101" '.($weight== 101 ? 'selected' : '').'>101 kg</option>
                <option value="102" '.($weight== 102 ? 'selected' : '').'>102 kg</option>
                <option value="103" '.($weight== 103 ? 'selected' : '').'>103 kg</option>
                <option value="104" '.($weight== 104 ? 'selected' : '').'>104 kg</option>
                <option value="105" '.($weight== 105 ? 'selected' : '').'>105 kg</option>
                <option value="106" '.($weight== 106 ? 'selected' : '').'>106 kg</option>
                <option value="107" '.($weight== 107 ? 'selected' : '').'>107 kg</option>
                <option value="108" '.($weight== 108 ? 'selected' : '').'>108 kg</option>
                <option value="109" '.($weight== 109 ? 'selected' : '').'>109 kg</option>
                <option value="110" '.($weight== 110 ? 'selected' : '').'>110 kg</option>
                <option value="111" '.($weight== 111 ? 'selected' : '').'>111 kg</option>
                <option value="112" '.($weight== 112 ? 'selected' : '').'>112 kg</option>
                <option value="113" '.($weight== 113 ? 'selected' : '').'>113 kg</option>
                <option value="114" '.($weight== 114 ? 'selected' : '').'>114 kg</option>
                <option value="115" '.($weight== 115 ? 'selected' : '').'>115 kg</option>
                <option value="116" '.($weight== 116 ? 'selected' : '').'>116 kg</option>
                <option value="117" '.($weight== 117 ? 'selected' : '').'>117 kg</option>
                <option value="118" '.($weight== 118 ? 'selected' : '').'>118 kg</option>
                <option value="119" '.($weight== 119 ? 'selected' : '').'>119 kg</option>
                <option value="120" '.($weight== 120 ? 'selected' : '').'>120 kg</option>
                <option value="121" '.($weight== 121 ? 'selected' : '').'>121 kg</option>
                <option value="122" '.($weight== 122 ? 'selected' : '').'>122 kg</option>
                <option value="123" '.($weight== 123 ? 'selected' : '').'>123 kg</option>
                <option value="124" '.($weight== 124 ? 'selected' : '').'>124 kg</option>
                <option value="125" '.($weight== 125 ? 'selected' : '').'>125 kg</option>
                <option value="126" '.($weight== 126 ? 'selected' : '').'>126 kg</option>
                <option value="127" '.($weight== 127 ? 'selected' : '').'>127 kg</option>
                <option value="128" '.($weight== 128 ? 'selected' : '').'>128 kg</option>
                <option value="129" '.($weight== 129 ? 'selected' : '').'>129 kg</option>
                <option value="130" '.($weight== 130 ? 'selected' : '').'>130 kg</option>
                <option value="131" '.($weight== 131 ? 'selected' : '').'>131 kg</option>
                <option value="132" '.($weight== 131 ? 'selected' : '').'>132 kg</option>
                <option value="133" '.($weight== 133 ? 'selected' : '').'>133 kg</option>
                <option value="134" '.($weight== 134 ? 'selected' : '').'>134 kg</option>
                <option value="135" '.($weight== 135 ? 'selected' : '').'>135 kg</option>
                <option value="136" '.($weight== 136 ? 'selected' : '').'>136 kg</option>
                <option value="137" '.($weight== 137 ? 'selected' : '').'>137 kg</option>
                <option value="138" '.($weight== 138 ? 'selected' : '').'>138 kg</option>
                <option value="139" '.($weight== 139 ? 'selected' : '').'>139 kg</option>
                <option value="140" '.($weight== 140 ? 'selected' : '').'>140 kg</option>';
				}
	function get_select_age($day){
		
		
		 return '<option value="" >-Date-</option>
				<option value="18" '.($day== 18 ? 'selected' : '').'>18</option>
				<option value="19" '.($day== 19 ? 'selected' : '').'>19</option>
				<option value="20" '.($day== 20 ? 'selected' : '').'>20</option>
				<option value="21" '.($day== 21 ? 'selected' : '').'>21</option>
				<option value="22" '.($day== 22 ? 'selected' : '').'>22</option>
				<option value="23" '.($day== 23 ? 'selected' : '').'>23</option>
				<option value="24" '.($day== 24 ? 'selected' : '').'>24</option>
				<option value="25" '.($day== 25 ? 'selected' : '').'>25</option>
				<option value="26" '.($day== 26 ? 'selected' : '').'>26</option>
				<option value="27" '.($day== 27 ? 'selected' : '').'>27</option>
				<option value="28" '.($day== 28 ? 'selected' : '').'>28</option>
				<option value="29" '.($day== 29 ? 'selected' : '').'>29</option>
				<option value="30" '.($day== 30 ? 'selected' : '').'>30</option>
				<option value="31" '.($day== 31 ? 'selected' : '').'>31</option>
				<option value="32" '.($day== 32 ? 'selected' : '').'>32</option>
				<option value="33" '.($day== 33 ? 'selected' : '').'>33</option>
				<option value="34" '.($day== 34 ? 'selected' : '').'>34</option>
				<option value="35" '.($day== 35 ? 'selected' : '').'>35</option>
				<option value="36" '.($day== 36 ? 'selected' : '').'>36</option>
				<option value="37" '.($day== 37 ? 'selected' : '').'>37</option>
				<option value="38" '.($day== 38 ? 'selected' : '').'>38</option>
				<option value="39" '.($day== 39 ? 'selected' : '').'>39</option>
				<option value="40" '.($day== 40 ? 'selected' : '').'>40</option>
				<option value="41" '.($day== 41 ? 'selected' : '').'>41</option>
				<option value="42" '.($day== 42 ? 'selected' : '').'>42</option>
				<option value="43" '.($day== 43 ? 'selected' : '').'>43</option>
				<option value="44" '.($day== 44 ? 'selected' : '').'>44</option>
				<option value="45" '.($day== 45 ? 'selected' : '').'>45</option>
				<option value="46" '.($day== 46 ? 'selected' : '').'>46</option>
				<option value="47" '.($day== 47 ? 'selected' : '').'>47</option>
				<option value="48" '.($day== 48 ? 'selected' : '').'>48</option>
				<option value="49" '.($day== 49 ? 'selected' : '').'>49</option>
				<option value="50" '.($day== 50 ? 'selected' : '').'>50</option>
				<option value="51" '.($day== 51 ? 'selected' : '').'>51</option>
				<option value="52" '.($day== 52 ? 'selected' : '').'>52</option>
				<option value="53" '.($day== 53 ? 'selected' : '').'>53</option>
				<option value="54" '.($day== 54 ? 'selected' : '').'>54</option>
				<option value="55" '.($day== 55 ? 'selected' : '').'>55</option>
				<option value="56" '.($day== 56 ? 'selected' : '').'>56</option>
				<option value="57" '.($day== 57 ? 'selected' : '').'>57</option>
				<option value="58" '.($day== 58 ? 'selected' : '').'>58</option>
				<option value="59" '.($day== 59 ? 'selected' : '').'>59</option>
				<option value="60" '.($day== 60 ? 'selected' : '').'>60</option>
				<option value="61" '.($day== 61 ? 'selected' : '').'>61</option>
				<option value="62" '.($day== 62 ? 'selected' : '').'>62</option>
				<option value="63" '.($day== 63 ? 'selected' : '').'>63</option>
				<option value="64" '.($day== 64 ? 'selected' : '').'>64</option>
				<option value="65" '.($day== 65 ? 'selected' : '').'>65</option>
				<option value="66" '.($day== 66 ? 'selected' : '').'>66</option>
				<option value="67" '.($day== 67 ? 'selected' : '').'>67</option>
				<option value="68" '.($day== 68 ? 'selected' : '').'>68</option>
				<option value="69" '.($day== 69 ? 'selected' : '').'>69</option>
				<option value="70" '.($day== 70 ? 'selected' : '').'>70</option>
             ';
				
				
		}
	
	
	function get_selectbox($id,$table='ticket_status',$multireocrd=0){
	$options ='';
	$CI = & get_instance();
	if($multireocrd==1){
		$query=mysql_query("SELECT m_languages.* 
						    FROM  m_languages,m_members
							WHERE FIND_IN_SET(m_languages.id, m_members.languages_known) AND m_members.id=".$CI->session->userdata("USER_ID")."");
		
		
	}
	else{						
	    $query = mysql_query("SELECT * FROM $table WHERE status = 1" );
		
		while($row = mysql_fetch_array($query)){
			$options .= '<option  value="'.$row['id'].'" '.($row['id']== $id ? 'selected' : '').'>'.$row['name'].'</option>';
		}
	}
	return $options;	
	/*<option value="1">Assamese</option>
                  <option value="2">Bengali</option>
                  <option value="3">English</option>
                  <option value="4">Gujarati</option>
                  <option value="5">Hindi</option>
                  <option value="6">Kannada</option>
                  <option value="7">Kashmiri</option>
                  <option value="8">Konkani</option>
                  <option value="9">Kutchi</option>
                  <option value="10">Malayalam</option>
                  <option value="11">Marathi</option>
                  <option value="12">Marwadi</option>
                  <option value="13">Odiya</option>
                  <option value="14">Punjabi</option>
                  <option value="15">Sindhi</option>
                  <option value="16">Tamil</option>
                  <option value="17">Telugu</option>
                  <option value="18">Tulu</option>
                  <option value="19">Urdu</option>*/
	}
